import { S } from '../../s';
import { IPSAppView } from '../../app/view/ipsapp-view';
import { IPSControlAttribute } from '../ipscontrol-attribute';
import { IPSControlLogic } from '../ipscontrol-logic';
import { IPSControlRender } from '../ipscontrol-render';
import { IPSNavigateContext } from '../ipsnavigate-context';
import { IPSNavigateParam } from '../ipsnavigate-param';
import { IPSDEDRCtrlItem } from './ipsdedrctrl-item';
import { IPSLanguageRes } from '../../res/ipslanguage-res';
import { IPSSysImage } from '../../res/ipssys-image';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSDEDRCtrlItemImpl
  extends PSModelObjectImpl
  implements IPSDEDRCtrlItem
{
  protected cappslanguageres: IPSLanguageRes;
  getCapPSLanguageRes(): IPSLanguageRes | null {
    return (
      this.cappslanguageres ||
      (this.cappslanguageres = this.fillObjectModel(
        S._276,
        this.M.getCapPSLanguageRes,
        S._2a8,
      ) as IPSLanguageRes)
    );
  }

  get caption(): string {
    return this.M.caption;
  }

  get counterId(): string {
    return this.M.counterId;
  }

  protected psappview: IPSAppView;
  getPSAppView(): IPSAppView | null {
    return (
      this.psappview ||
      (this.psappview = this.fillObjectModel(
        S._1e,
        this.M.getPSAppView,
        S._2c4,
      ) as IPSAppView)
    );
  }

  protected pscontrolattributes: IPSControlAttribute[];
  getPSControlAttributes(): IPSControlAttribute[] | null {
    return (
      this.pscontrolattributes ||
      (this.pscontrolattributes = this.fillChildListModel(
        this.M.getPSControlAttributes,
        S._3f5,
      ) as IPSControlAttribute[])
    );
  }

  findPSControlAttribute(objKey: any): IPSControlAttribute | null {
    return this.getPSModel5(
      S._3f5,
      this.getPSControlAttributes(),
      objKey,
    ) as IPSControlAttribute;
  }

  protected pscontrollogics: IPSControlLogic[];
  getPSControlLogics(): IPSControlLogic[] | null {
    return (
      this.pscontrollogics ||
      (this.pscontrollogics = this.fillChildListModel(
        this.M.getPSControlLogics,
        S._38d,
      ) as IPSControlLogic[])
    );
  }

  findPSControlLogic(objKey: any): IPSControlLogic | null {
    return this.getPSModel5(
      S._38d,
      this.getPSControlLogics(),
      objKey,
    ) as IPSControlLogic;
  }

  protected pscontrolrenders: IPSControlRender[];
  getPSControlRenders(): IPSControlRender[] | null {
    return (
      this.pscontrolrenders ||
      (this.pscontrolrenders = this.fillChildListModel(
        this.M.getPSControlRenders,
        S._3f6,
      ) as IPSControlRender[])
    );
  }

  findPSControlRender(objKey: any): IPSControlRender | null {
    return this.getPSModel5(
      S._3f6,
      this.getPSControlRenders(),
      objKey,
    ) as IPSControlRender;
  }

  protected psnavigatecontexts: IPSNavigateContext[];
  getPSNavigateContexts(): IPSNavigateContext[] | null {
    return (
      this.psnavigatecontexts ||
      (this.psnavigatecontexts = this.fillChildListModel(
        this.M.getPSNavigateContexts,
        S._8c,
      ) as IPSNavigateContext[])
    );
  }

  findPSNavigateContext(objKey: any): IPSNavigateContext | null {
    return this.getPSModel5(
      S._8c,
      this.getPSNavigateContexts(),
      objKey,
    ) as IPSNavigateContext;
  }

  protected psnavigateparams: IPSNavigateParam[];
  getPSNavigateParams(): IPSNavigateParam[] | null {
    return (
      this.psnavigateparams ||
      (this.psnavigateparams = this.fillChildListModel(
        this.M.getPSNavigateParams,
        S._8a,
      ) as IPSNavigateParam[])
    );
  }

  findPSNavigateParam(objKey: any): IPSNavigateParam | null {
    return this.getPSModel5(
      S._8a,
      this.getPSNavigateParams(),
      objKey,
    ) as IPSNavigateParam;
  }

  protected pssysimage: IPSSysImage;
  getPSSysImage(): IPSSysImage | null {
    return (
      this.pssysimage ||
      (this.pssysimage = this.fillObjectModel(
        S._27b,
        this.M.getPSSysImage,
        S._2ad,
      ) as IPSSysImage)
    );
  }
  get cls(): string {
    return 'PSDEDRCtrlItemImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._3f7 || cls == S._7 || cls == S._a0) return true;
    return super.instanceof(cls);
  }
}
